import Vue from 'vue'
import VueRouter from 'vue-router'
import Films from '../views/Films'
import Article from '../views/Article'
import Center from '../views/Center'
import MovieDetail from '../views/Films/MovieDetail.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: "/films",
    name: 'Films',
    component: Films,
    meta: {
      isNav: true
    }
  },
  {
    path: "/article",
    name: "Article",
    component: Article,
    meta: {
      isNav: true
    }
  },
  {
    path: "/center",
    name: "Center",
    component: Center,
    meta: {
      isNav: true
    }
  },
  {
    path: "/movie/:id",
    name: 'MovieDetail',
    component: MovieDetail
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
